local hx__tayong = fk.CreateSkill {
  name = "hx__tayong",
  tags = { Skill.Compulsory, },
}


hx__tayong:addEffect(fk.DamageInflicted, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(hx__tayong.name) and player.phase ~= Player.NotActive then
      return player == target
    end
  end,
  on_use = function(self, event, target, player, data)
    data:preventDamage()
  end,
})
hx__tayong:addEffect(fk.PreHpLost, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(hx__tayong.name) and player.phase ~= Player.NotActive then
      return player == target
    end
  end,
  on_use = function(self, event, target, player, data)
    data.num = 0
  end,
})
hx__tayong:addEffect(fk.BeforeMaxHpChanged, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(hx__tayong.name) and player.phase ~= Player.NotActive then
      return player == target and data.num < 0
    end
  end,
  on_use = function(self, event, target, player, data)
    data.num = 0
  end,
})

return hx__tayong